#ifndef _CANARY2_CORO_THIS_COROUTINE_H_
#define _CANARY2_CORO_THIS_COROUTINE_H_

#include <chrono>
#include "sleep_this_coro.h"
#include "../sys/scheduler_concepts.h"
#include "sleeping_suspend_manager.h"

namespace wilson::coro::this_coroutine
{
    template<typename Schr>
    [[nodiscard]] sleep_dura_aw<Schr>
    sleep_for(::std::chrono::milliseconds timeout, 
              sleeping_suspend_manager<Schr>& ssm)
    {
        return { timeout, ssm };
    }

    template<typename Clock, typename Schr>
    [[nodiscard]] sleep_timep_aw<Clock, Schr>
    sleep_until(::std::chrono::time_point<Clock> tp,
                sleeping_suspend_manager<Schr>& ssm)
    {
        return { tp, ssm };
    }
}

#endif
